﻿//-----------------------------------------------------------------------
// <copyright file="Navigation.cs" company="CKS.Office365">
// CKS Office365 CodePlex
// </copyright>
//-----------------------------------------------------------------------

namespace CKS.Office365.Prerequisite
{
    using Microsoft.SharePoint;

    /// <summary>
    /// A helper class for configuring the Navigation of a site
    /// </summary>
    internal static class Navigation
    {
        /// <summary>
        /// Clears the quick launch.
        /// </summary>
        /// <param name="webContext">The web context.</param>
        internal static void ClearQuickLaunch(SPWeb webContext)
        {
            // Clear current quick launch
            for (int i = webContext.Navigation.QuickLaunch.Count - 1; i > -1; i--)
            {
                webContext.Navigation.QuickLaunch[i].Delete();
            }
        }
    }
}
